package com.house365.core.fragment;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

import com.house365.core.R;

/**
 *@author py
 *@date 2012-12-3
 *@comment
 */
public abstract class ActivityFragment extends LocalActivityManagerFragment {
	private TabHost mTabHost;
	
	@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {        
        View view = inflater.inflate(R.layout.activity_fragment, container, false);
        mTabHost = (TabHost)view.findViewById(android.R.id.tabhost);
        mTabHost.setup(getLocalActivityManager());
        
        TabSpec tab = mTabHost.newTabSpec("map")
                              .setIndicator("map")
                              .setContent(getIntentActivity(getActivity()));
        mTabHost.addTab(tab);        
        return view;
    }
	public abstract Intent getIntentActivity(Activity activity);
}
